package com.enhe.gck.fg;

import com.alibaba.fastjson.JSON;
import com.enhe.gck.com.oracle.OracleController;
import com.enhe.gck.com.oracle.OracleEntity;
import com.enhe.gck.com.oracle.OracleService;
import com.enhe.gck.communal.*;
import com.enhe.gck.item.ExchangeDayHWANE16821Item;
import com.enhe.gck.item.TkjlHWANE25592Item;
import com.enhe.gck.pojo.*;
import com.kuangkie.carbon.common.IntegrationMsg;
import com.kuangkie.carbon.enun.SortDirection;
import com.kuangkie.carbon.fg.*;
import com.kuangkie.carbon.fg.ops.ProRecordOpsBuilder;
import com.kuangkie.carbon.panel.CarbonPanel;
import com.kuangkie.carbon.record.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;
import com.enhe.gck.CarbonBaseConstant; //模型Code
import com.enhe.gck.CarbonEnumKeyValue; //枚举字典信息
import com.enhe.gck.CarbonRelationType; //关系类型Code
import com.enhe.gck.item.RechargeHWANE16698Item; // 模型属性Code

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Slf4j
@Repository(value = "hwane16698366042330866425862")
public class RechargeHWANE16698BNB implements SecondRoundImproveFuncGroup, FuseCallBackFuncGroup , FetchFuncGroup{
	@Resource
	private OracleController oracleController;
	@Resource
	private AsyncImpl asyncImpl;
	@Resource
	private ConfigHWANE16627BNB configHWANE16627BNB;
	@Resource
	private OracleService oracleService;

	@Override
	public void secondImprove(FuncGroupContext context, ProRecord proRecord, FGRecordComplexus recordComplexus,
			ImproveResultFactory improveResultFactory) {
		Recharge info=proRecord.getBean(Recharge.class);
		log.info("插入/修改充值记录{}", JSON.toJSON(info));
		if(proRecord.isNew()){
			OperationLogHWANE21797BNB.save(improveResultFactory,1,1,proRecord.getRecordCode());
			if(PublicMethod.verifyIsStopCustomer(proRecord,improveResultFactory,PublicConstant.RM)){
				return;
			}
			if(PublicMethod.validateDecimal(new BigDecimal(String.valueOf(info.getMoneyCurrency())),improveResultFactory)){
				return;
			}

			ProRecordOpsBuilder setData=improveResultFactory.getCurrentProRecordOpsBuilder();
			setData.putAttribute(RechargeHWANE16698Item.基本属性组_单号,PublicMethod.getOrderCodeRM());
			setData.putAttribute(RechargeHWANE16698Item.基本属性组_是否同步,false);
			setData.putAttribute(RechargeHWANE16698Item.基本属性组_作废,false);
			setData.putAttribute(RechargeHWANE16698Item.基本属性组_作废同步,false);
			BigDecimal money;

			PublicEntity.Exchange exchange=getExchangeA();
			if(exchange.getValue()==null){
				PublicMethod.returnMessage(improveResultFactory, PublicReturn.Recharge_1);
				return;
			}

			Bank bank = recordComplexus.getGuestRecord(proRecord.getModelCode(), proRecord.getRecordCode(), CarbonRelationType.RR_充值记录_银行账户_银行账户).getBean(Bank.class);
			if (bank == null) {
				PublicMethod.returnMessage(improveResultFactory, PublicReturn.Recharge_9);
				return;
			}
			String currency = bank.getCurrency();
			setData.putAttribute(RechargeHWANE16698Item.基本属性组_币种,currency);

			if(Long.parseLong(currency)==CarbonEnumKeyValue.币种_USD_){
				money=BigDecimal.valueOf(proRecord.getDoubleValue(RechargeHWANE16698Item.基本属性组_当前币种金额));
			}else {
				money=PublicMethod.divideBigDecimal(proRecord.getDoubleValue(RechargeHWANE16698Item.基本属性组_当前币种金额),exchange.getValue(), PublicConstant.leastCDF,null);
			}
			setData.putAttribute(RechargeHWANE16698Item.基本属性组_计算汇率,exchange.getValue());
			if(exchange.getValuef()==null){
				setData.putAttribute(RechargeHWANE16698Item.基本属性组_计算汇率f,exchange.getValue().compareTo(BigDecimal.ZERO)==0?BigDecimal.ZERO:PublicMethod.divideBigDecimal("1",exchange.getValue(),9,null));
			}else {
				setData.putAttribute(RechargeHWANE16698Item.基本属性组_计算汇率f,exchange.getValuef());
			}
			setData.putAttribute(RechargeHWANE16698Item.基本属性组_充值金额,money);
			setData.putAttribute(RechargeHWANE16698Item.基本属性组_可用余额,money);
			setData.putAttribute(RechargeHWANE16698Item.基本属性组_实际扣款,0);
		}else {
			if(info.getIsCancel()!=null&&!info.getIsCancel()){
				if(String.valueOf(CarbonEnumKeyValue.操作命令_sb退款_tk).equals(info.getCommand())){
					BigDecimal availableBalance=new BigDecimal(String.valueOf(info.getAvailableBalance()));

					if(info.getTmd()!=null&& info.getTmd().compareTo(BigDecimal.ZERO)>=0&& info.getTmd().compareTo(availableBalance)<=0
					){
						OperationLogHWANE21797BNB.save(improveResultFactory,1,9,proRecord.getRecordCode());
						PublicMethod.saveAdd(improveResultFactory,CarbonBaseConstant.退款记录_tkjl)
								.putAttribute(TkjlHWANE25592Item.基本属性组_退款金额,info.getTmd())
								.putAttribute(TkjlHWANE25592Item.基本属性组_退款时间, LocalDateTime.now())
								.addRelation(CarbonRelationType.RR_退款记录_属于充值记录_退款记录_充值记录,info.getRecordCode());
						improveResultFactory.getCurrentProRecordOpsBuilder()
								.putAttribute(RechargeHWANE16698Item.基本属性组_实际退款,info.getMoneyRefund()==null?info.getTmd():info.getMoneyRefund().add(info.getTmd()))
								.putAttribute(RechargeHWANE16698Item.基本属性组_可用余额,availableBalance.subtract(info.getTmd()));
					}else {
						PublicMethod.returnMessage(improveResultFactory, PublicReturn.Recharge_7);
						return;
					}
				}

//				if(String.valueOf(CarbonEnumKeyValue.操作命令_sb天天爱消除_ttaxc).equals(info.getCommand())){
//					BigDecimal availableBalance=new BigDecimal(String.valueOf(info.getAvailableBalance()));
//					if(info.getTmd()!=null&&info.getTmd().compareTo(BigDecimal.ZERO)>=0&&info.getTmd().compareTo(availableBalance)<=0){
//						improveResultFactory.getCurrentProRecordOpsBuilder()
//								.putAttribute(RechargeHWANE16698Item.基本属性组_实际消除,info.getMoneyXc()==null?info.getTmd():info.getMoneyXc().add(info.getTmd()))
//								.putAttribute(RechargeHWANE16698Item.基本属性组_可用余额,availableBalance.subtract(info.getTmd()));
//					}else {
//						PublicMethod.returnMessage(improveResultFactory, PublicReturn.Recharge_7);
//						return;
//					}
//				}
			}
		}

		if(info.getIsCancel()!=null&&info.getIsCancel()){
			if(info.getRechargeAmount().compareTo(info.getAvailableBalance())!=0){
				PublicMethod.returnMessage(improveResultFactory, PublicReturn.Recharge_4);
				return;
			}

			if(!setDelete(info.getRecordCode(),improveResultFactory)){

				return;
			}
		}
	}

	@Override
	public boolean afterFusition(FuncGroupContext funcGroupContext, FuseContext fuseContext, String s) {
		ProRecord proRecord=CarbonPanel.getRecordDiscover(CarbonBaseConstant.充值记录_czjl).getProRecord(s);
		if(proRecord!=null){
			if(fuseContext.isNewCreate()){
				saveRecharge(proRecord);
			}
			//触发客户余额失效
			PublicMethod.dataPermanent.invalidate(PublicConstant.redisHeaderKhCq+proRecord.getGuestRecordCode(CarbonRelationType.RR_充值记录_客户名称_客户管理));
		}
		return true;
	}
	/**
	 * 触发类似删除
	 * @param id 记录id
	 */
	private boolean setDelete(String id,ImproveResultFactory improveResultFactory){
		Recharge info=CarbonPanel.getRecordDiscover(CarbonBaseConstant.充值记录_czjl).getRecordBean(id,Recharge.class,1);
		if(info!=null&&info.getIsCancel()!=null&&!info.getIsCancel()){
			OperationLogHWANE21797BNB.save(improveResultFactory,1,3,id);

			if(info.getFlagSync()!=null&&info.getFlagSync()){
				ProRecord proRecord=CarbonPanel.getRecordDiscover(CarbonBaseConstant.充值记录_czjl).getProRecord(id);
				log.info("已同步，触发同步失效{}", JSON.toJSON(info));
				if(proRecord!=null){
					if(saveRechargeDelete(proRecord)){
						improveResultFactory.getCurrentProRecordOpsBuilder().putAttribute(RechargeHWANE16698Item.基本属性组_作废同步,true);
					}
				}
			}else {
				log.info("未同步，不触发同步失效{}", JSON.toJSON(info));
			}
		}
		return true;
	}

	public void saveRecharge(ProRecord proRecord){
		log.info("触发同步{}", JSON.toJSON(proRecord));
		Recharge info= proRecord.getBean(Recharge.class);
		List<OracleEntity.Recharge> list=new ArrayList<>();
		OracleEntity.Recharge recharge=new OracleEntity.Recharge();
		Customer khInfo= CarbonPanel.getRecordQueryFactory(CarbonBaseConstant.客户管理_khgl).getProConJunctionFactory()
				.addEqual(CarbonBaseConstant.COLUMN_ABP0001,proRecord.getGuestRecordCode(CarbonRelationType.RR_充值记录_客户名称_客户管理))
				.goBack().queryABean(Customer.class,2);
		if(khInfo.getType().equals(String.valueOf(CarbonEnumKeyValue.客户管理_客户类型_散户_sh))){
			recharge.setEntityId(khInfo.getCustomer().getCustomerId());
			recharge.setEntityName(khInfo.getCustomer().getName());
		}else{
			recharge.setEntityId(khInfo.getCustomerId());
			recharge.setEntityName(khInfo.getName());
		}
		//TODO 待确定 补贴 授信 是否发送甲骨文
		if(String.valueOf(CarbonEnumKeyValue.充值记录_充值类型_补贴_bt).equals(proRecord.getString(RechargeHWANE16698Item.基本属性组_充值类型))){
			return;
		}
//		if(String.valueOf(CarbonEnumKeyValue.充值记录_充值类型_授信_sx).equals(proRecord.getString(RechargeHWANE16698Item.基本属性组_充值类型))){
//			return;
//		}

		if(proRecord.getLongValue(RechargeHWANE16698Item.基本属性组_币种)==CarbonEnumKeyValue.币种_USD_){
			recharge.setCurrency("USD");
		}
		if(proRecord.getLongValue(RechargeHWANE16698Item.基本属性组_币种)==CarbonEnumKeyValue.币种_CDF_){
			//TODO 甲骨文确定后修改 暂时用CDF代替 准备改成 USD 其它参数传cdf  originalcurrency 实际收款币种    originalamount 实际收款金额    payexchangerate GCK子公司传原币换算成美金的汇率
//			recharge.setCurrency("CDF");
			recharge.setCurrency("USD");
			recharge.setOriginalcurrency("CDF");
			recharge.setOriginalamount(String.valueOf(info.getMoneyCurrency()));
			recharge.setPayexchangerate(PublicMethod.bigDecimalScale(info.getExchangef(),9).toPlainString());
		}
		recharge.setDocumentNo(proRecord.getString(RechargeHWANE16698Item.基本属性组_单号));
		recharge.setDate(PublicMethod.removeHeaderZero(PublicMethod.getDate(PublicEnum.DateString.date2.getCode()),"/"));

//		recharge.setAmount(proRecord.getString(RechargeHWANE16698Item.基本属性组_当前币种金额));
		recharge.setAmount(proRecord.getString(RechargeHWANE16698Item.基本属性组_充值金额));
		recharge.setEhId(proRecord.getRecordCode());

		Bank bank=CarbonPanel.getRecordDiscover(CarbonBaseConstant.银行账户_yxzh)
				.getRecordBean(String.valueOf(proRecord.getGuestRecordCode(CarbonRelationType.RR_充值记录_银行账户_银行账户)),Bank.class);
		recharge.setBankAccount(bank.getCode());
		recharge.setMemo(info.getName());
		list.add(recharge);
		log.info("同步异步开启");
		asyncImpl.saveRecharge(list);
	}

	public boolean saveRechargeDelete(ProRecord proRecord){
		Recharge info= proRecord.getBean(Recharge.class);
		Customer khInfo= CarbonPanel.getRecordQueryFactory(CarbonBaseConstant.客户管理_khgl).getProConJunctionFactory()
				.addEqual(CarbonBaseConstant.COLUMN_ABP0001,proRecord.getGuestRecordCode(CarbonRelationType.RR_充值记录_客户名称_客户管理))
				.goBack().queryABean(Customer.class);
		if(!khInfo.getType().equals(String.valueOf(CarbonEnumKeyValue.客户管理_客户类型_散户_sh))){
			return true;
		}

		List<OracleEntity.Recharge> list=new ArrayList<>();
		OracleEntity.Recharge recharge=new OracleEntity.Recharge();
		if(proRecord.getLongValue(RechargeHWANE16698Item.基本属性组_币种)==CarbonEnumKeyValue.币种_USD_){
			recharge.setCurrency("USD");
		}
		if(proRecord.getLongValue(RechargeHWANE16698Item.基本属性组_币种)==CarbonEnumKeyValue.币种_CDF_){
//			recharge.setCurrency("CDF");
			recharge.setCurrency("USD");
			recharge.setOriginalcurrency("CDF");
			recharge.setOriginalamount(PublicConstant.HORIZONTAL+String.valueOf(info.getMoneyCurrency()));
			recharge.setPayexchangerate(PublicMethod.bigDecimalScale(info.getExchangef(),9).toPlainString());
		}
		recharge.setDocumentNo(proRecord.getString(RechargeHWANE16698Item.基本属性组_单号)+PublicConstant.DELETE);
		recharge.setDate(PublicMethod.removeHeaderZero(PublicMethod.getDate(PublicEnum.DateString.date2.getCode()),"/"));

//		recharge.setAmount(PublicConstant.HORIZONTAL+proRecord.getString(RechargeHWANE16698Item.基本属性组_当前币种金额));
		recharge.setAmount(PublicConstant.HORIZONTAL+proRecord.getString(RechargeHWANE16698Item.基本属性组_充值金额));
		recharge.setEhId(proRecord.getRecordCode());

		Bank bank=CarbonPanel.getRecordDiscover(CarbonBaseConstant.银行账户_yxzh)
				.getRecordBean(String.valueOf(proRecord.getGuestRecordCode(CarbonRelationType.RR_充值记录_银行账户_银行账户)),Bank.class);
		recharge.setBankAccount(bank.getCode());

		recharge.setEntityId(khInfo.getCustomerId());
		recharge.setEntityName(khInfo.getName());
		list.add(recharge);
		return oracleService.saveRechargeNoUpdate(list,true);
	}

	/**
	 * 获取甲骨文汇率
	 */
	public BigDecimal getExchange() {
		BigDecimal exchange;
		ExchangeDay info=CarbonPanel
				.getRecordQueryFactory(CarbonBaseConstant.每日汇率_mrhl).getProConJunctionFactory()
				.addEqual(ExchangeDayHWANE16821Item.基本属性组_日期,PublicMethod.getDate()).goBack().queryABean(ExchangeDay.class);
		if(info==null){
			OracleEntity.Parameter en=new OracleEntity.Parameter();
			String date= PublicMethod.getDate(PublicEnum.DateString.date2.getCode());
			en.setTransactionCurrency(PublicEnum.Currency.USD.getCode());
			en.setBaseCurrency(PublicEnum.Currency.CDF.getCode());
			en.setStartDate(date);
			en.setEndDate(date);
			exchange=oracleController.getRate(en);
			if(!(exchange ==null)){
				ExchangeDay saveInfo=new ExchangeDay();
				saveInfo.setDate(new Date());

				//甲骨文数据处理	现为 1%刚果币换美元
//				saveInfo.setValue(exchange.compareTo(BigDecimal.ZERO)==0?BigDecimal.ZERO:PublicMethod.divideBigDecimal("1",exchange,0,null));
				try {
					en.setTransactionCurrency(PublicEnum.Currency.CDF.getCode());
					en.setBaseCurrency(PublicEnum.Currency.USD.getCode());
					BigDecimal exchangef=oracleController.getRate(en);
					saveInfo.setValuef(exchangef);
				}catch (Exception e){}
				saveInfo.setValue(exchange);
				saveInfo.setIsSystem(true);
				log.info("插入每日汇率信息{}", JSON.toJSON(saveInfo));
				CarbonPanel.getRecordIntegration(CarbonBaseConstant.每日汇率_mrhl).integrate(saveInfo);
			}else {
				ExchangeDay infoS=CarbonPanel
						.getRecordQueryFactory(CarbonBaseConstant.每日汇率_mrhl).getProConJunctionFactory()
						.goBack()
						.addSortItem(ExchangeDayHWANE16821Item.基本属性组_日期, SortDirection.DESC).queryABean(ExchangeDay.class);
				log.info("复用上一次汇率{}",JSON.toJSON(infoS));
				FGRecordComplexusBuilder fGRecordComplexusBuilder=CarbonPanel.getFGRecordComplexusBuilder();
				ProRecordBuilder order=fGRecordComplexusBuilder.getProRecordBuilder(CarbonBaseConstant.每日汇率_mrhl);
				order.putAttribute(ExchangeDayHWANE16821Item.基本属性组_日期,PublicMethod.getDate());
				order.putAttribute(ExchangeDayHWANE16821Item.基本属性组_汇率值,infoS.getValue());
				order.putAttribute(ExchangeDayHWANE16821Item.基本属性组_汇率值反,infoS.getValuef());
				order.putAttribute(ExchangeDayHWANE16821Item.基本属性组_是否系统获取,0);
				IntegrationMsg msg=CarbonPanel.getRecordIntegration(CarbonBaseConstant.每日汇率_mrhl)
						.integrate(fGRecordComplexusBuilder.getFGRecordComplexus());
				exchange=infoS.getValue();
			}
		}else {
			exchange=info.getValue();
		}
		return exchange;
	}

	public PublicEntity.Exchange getExchangeA() {
		PublicEntity.Exchange cc=new PublicEntity.Exchange();
		BigDecimal exchange;
		BigDecimal exchangef=null;
		ExchangeDay info=CarbonPanel
				.getRecordQueryFactory(CarbonBaseConstant.每日汇率_mrhl).getProConJunctionFactory()
				.addEqual(ExchangeDayHWANE16821Item.基本属性组_日期,PublicMethod.getDate()).goBack().queryABean(ExchangeDay.class);
		if(info==null){
			OracleEntity.Parameter en=new OracleEntity.Parameter();
			String date= PublicMethod.getDate(PublicEnum.DateString.date2.getCode());
			en.setTransactionCurrency(PublicEnum.Currency.USD.getCode());
			en.setBaseCurrency(PublicEnum.Currency.CDF.getCode());
			en.setStartDate(date);
			en.setEndDate(date);
			exchange=oracleController.getRate(en);
			if(!(exchange ==null)){
				ExchangeDay saveInfo=new ExchangeDay();
				saveInfo.setDate(new Date());

				//甲骨文数据处理	现为 1%刚果币换美元
//				saveInfo.setValue(exchange.compareTo(BigDecimal.ZERO)==0?BigDecimal.ZERO:PublicMethod.divideBigDecimal("1",exchange,0,null));
				try {
					en.setTransactionCurrency(PublicEnum.Currency.CDF.getCode());
					en.setBaseCurrency(PublicEnum.Currency.USD.getCode());
					exchangef=oracleController.getRate(en);
				}catch (Exception e){}
				saveInfo.setValue(exchange);
				saveInfo.setValuef(exchangef);
				saveInfo.setIsSystem(true);
				log.info("插入每日汇率信息{}", JSON.toJSON(saveInfo));
				CarbonPanel.getRecordIntegration(CarbonBaseConstant.每日汇率_mrhl).integrate(saveInfo);
			}else {
				ExchangeDay infoS=CarbonPanel
						.getRecordQueryFactory(CarbonBaseConstant.每日汇率_mrhl).getProConJunctionFactory()
						.goBack()
						.addSortItem(ExchangeDayHWANE16821Item.基本属性组_日期, SortDirection.DESC).queryABean(ExchangeDay.class);
				log.info("复用上一次汇率{}",JSON.toJSON(infoS));
				FGRecordComplexusBuilder fGRecordComplexusBuilder=CarbonPanel.getFGRecordComplexusBuilder();
				ProRecordBuilder order=fGRecordComplexusBuilder.getProRecordBuilder(CarbonBaseConstant.每日汇率_mrhl);
				order.putAttribute(ExchangeDayHWANE16821Item.基本属性组_日期,PublicMethod.getDate());
				order.putAttribute(ExchangeDayHWANE16821Item.基本属性组_汇率值,infoS.getValue());
				order.putAttribute(ExchangeDayHWANE16821Item.基本属性组_汇率值反,infoS.getValuef());
				order.putAttribute(ExchangeDayHWANE16821Item.基本属性组_是否系统获取,0);
				IntegrationMsg msg=CarbonPanel.getRecordIntegration(CarbonBaseConstant.每日汇率_mrhl)
						.integrate(fGRecordComplexusBuilder.getFGRecordComplexus());
				exchange=infoS.getValue();
				exchangef=infoS.getValuef();
			}
		}else {
			exchange=info.getValue();
			exchangef=info.getValuef();
		}
		cc.setValue(exchange);
		cc.setValuef(exchangef);
		return cc;
	}

	@Override
	public void fetchImprove(FuncGroupContext funcGroupContext, FGRecord fgRecord, FetchResultFactory fetchResultFactory) {
		Recharge recharge=CarbonPanel.getRecordDiscover(CarbonBaseConstant.充值记录_czjl).getRecordBean(fgRecord.getRecordCode(),Recharge.class,3);
		if(recharge!=null){
			if(recharge.getUnivalence()!=null){
				if(recharge.getUnivalence().getGoods()!=null){
					if(recharge.getUnivalence().getUnit()>0){
						BigDecimal zong=PublicMethod.divideBigDecimal(recharge.getRechargeAmount(),recharge.getUnivalence().getUnit(),PublicConstant.weightDecimals,null);
//					BigDecimal kxdl=PublicMethod.divideBigDecimal(recharge.getAvailableBalance(),recharge.getUnivalence().getUnit(),PublicConstant.weightDecimals,null);
						if(String.valueOf(CarbonEnumKeyValue.订单记录_类型_袋装_dz).equals(recharge.getUnivalence().getGoods().getType())){
							String value =configHWANE16627BNB.getConfigValueOneWeight();
							BigDecimal zongD=PublicMethod.divideBigDecimal(zong,value,0, RoundingMode.DOWN);
//						BigDecimal kxdlD=PublicMethod.divideBigDecimal(kxdl,value,0, RoundingMode.DOWN);

							fetchResultFactory.getRecordOpsBuilder().putAttribute(RechargeHWANE16698Item.基本属性组_总袋数_袋_,zongD);

							fetchResultFactory.getRecordOpsBuilder().putAttribute(RechargeHWANE16698Item.基本属性组_购买量,zongD+" Sac");
//						fetchResultFactory.getRecordOpsBuilder().putAttribute(RechargeHWANE16698Item.基本属性组_可下袋数_袋_,kxdlD);
//						fetchResultFactory.getRecordOpsBuilder().putAttribute(RechargeHWANE16698Item.基本属性组_已下袋数_袋_,PublicMethod.subtractBigDecimal(zongD,kxdlD));
						}else {
							fetchResultFactory.getRecordOpsBuilder().putAttribute(RechargeHWANE16698Item.基本属性组_总重量_t_,zong);

							fetchResultFactory.getRecordOpsBuilder().putAttribute(RechargeHWANE16698Item.基本属性组_购买量,zong+" tonne");
//						fetchResultFactory.getRecordOpsBuilder().putAttribute(RechargeHWANE16698Item.基本属性组_可下单量_t_,kxdl);
//						fetchResultFactory.getRecordOpsBuilder().putAttribute(RechargeHWANE16698Item.基本属性组_已下重量_t_,PublicMethod.subtractBigDecimal(zong,kxdl));
						}
					}
				}
				fetchResultFactory.getRecordOpsBuilder().putAttribute(RechargeHWANE16698Item.基本属性组_产品名,recharge.getUnivalence().getGoods().getName());
				fetchResultFactory.getRecordOpsBuilder().putAttribute(RechargeHWANE16698Item.基本属性组_产品类型,recharge.getUnivalence().getGoods().getType());
			}
		}
	}
}
